package com.resifind.www.exception;

import com.resifind.www.constant.ErrorCode;

/**
 * @author 36069
 */
public class OrderException extends BaseException{
    public OrderException(ErrorCode errorCode) {
        super(errorCode);
    }

    public static OrderException orderNotComplete(){
        return new OrderException(ErrorCode.ORDER_NOT_COMPLETE);
    }

    public static OrderException orderNotCheckIn(){
        return new OrderException(ErrorCode.ORDER_NOT_CHICK_IN);
    }

    public static OrderException orderCannotCanceled(){
        return new OrderException(ErrorCode.ORDER_CANNOT_CANCEL);
    }

    public static OrderException orderNotFound(){
        return new OrderException(ErrorCode.ORDER_NOT_EXIST);
    }

    public static OrderException orderCannotRefund(){
        return new OrderException(ErrorCode.ORDER_CANNOT_REFUND);
    }

    public static OrderException orderCannotCheckout(){
        return new OrderException(ErrorCode.ORDER_CANNOT_CHECK_OUT);
    }

    public static OrderException orderAlreadyPaid(){
        return new OrderException(ErrorCode.ORDER_ALREADY_PAID);
    }
}
